//
//  Fraction.h
//  02-ClassAndObject
//
//  Created by dllo on 16/7/5.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface Fraction : NSObject
@property (nonatomic,assign) NSInteger numerator;
@property (nonatomic,assign) NSInteger denominator;

- (instancetype)initWithNumerator:(NSInteger)numerator denominator:(NSInteger)denominator;
+ (instancetype)fractionWithNumerator:(NSInteger)numerator denominator:(NSInteger)denominator;

- (Fraction *)reduce;

//加
- (Fraction *)addFraction:(Fraction *)fraction;
//减
- (Fraction *)subFraction:(Fraction *)fraction;
// 乘
- (Fraction *)mulFraction:(Fraction *)fraction;
//除
- (Fraction *)divFraction:(Fraction *)fraction;

- (void)compare:(Fraction *)fraction;

- (void)output;
@end
